package com.mthebron.mthapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class mainActivity extends Activity {
	private OnClickListener calClickListener = new OnClickListener() {
		public void onClick(View v) {
			// start Activity ___ when clicked
			Intent startCal = new Intent(mainActivity.this, CalendarActivity.class);
			mainActivity.this.startActivity(startCal);
		}
	};
	private OnClickListener teacherClickListener = new OnClickListener() {
		public void onClick(View v) {
			// start Activity ___ when clicked
			Intent startTeacher = new Intent(mainActivity.this, DisplayTeachers.class);
			mainActivity.this.startActivity(startTeacher);
		}
	};
	//uncomment when joe adds news, lunch
	private OnClickListener newsClickListener = new OnClickListener() {
		public void onClick(View v) {
			// start Activity ___ when clicked
			Intent startNews = new Intent(mainActivity.this, AndroidWebViewerActivity.class);
			mainActivity.this.startActivity(startNews);
		}
	};
	private OnClickListener lunchClickListener = new OnClickListener() {
		public void onClick(View v) {
			// start Activity ___ when clicked
			Intent startLunch = new Intent(mainActivity.this, Lunch.class);
			mainActivity.this.startActivity(startLunch);
		}
	};
	//remove when will's code works, added
	/*private OnClickListener mapClickListener = new OnClickListener() {
		public void onClick(View v) {
			// start Activity ___ when clicked
			Intent startMap = new Intent(mainActivity.this, null);
			mainActivity.this.startActivity(startContact);
		}
	};*/
	//add school contact info
	/*private OnClickListener contactClickListener = new OnClickListener() {
		public void onClick(View v) {
			// start Activity ___ when clicked
			Intent startCal = new Intent(mainActivity.this, null);
			mainActivity.this.startActivity(startContact);
		}
	};*/
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Button calButton = (Button) findViewById(R.id.calbutton);
        calButton.setOnClickListener(calClickListener);
        Button teacherButton = (Button) findViewById(R.id.teacherbutton);
        teacherButton.setOnClickListener(teacherClickListener);
        Button newsButton = (Button) findViewById(R.id.newsbutton);
        newsButton.setOnClickListener(newsClickListener);
        Button lunchButton = (Button) findViewById(R.id.lunchbutton);
        lunchButton.setOnClickListener(lunchClickListener);/*
        Button mapButton = (Button) findViewById(R.id.mapbutton);
        mapButton.setOnClickListener(mapClickListener);
        Button contactButton = (Button) findViewById(R.id.contactbutton);
        contactButton.setOnClickListener(contactClickListener);
        */
    }
}
/*example of button & listener
private OnClickListener mCorkyListener = new OnClickListener() {
public void onClick(View v) {
  // do something when the button is clicked
}
};

protected void onCreate(Bundle savedValues) {
...
// Capture our button from layout
Button button = (Button)findViewById(R.id.corky);
// Register the onClick listener with the implementation above
button.setOnClickListener(mCorkyListener);
...
}
*/
